//
//  ZCModelUser.m
//  zctx
//
//  Created by Darren Zheng on 15/10/8.
//  Copyright © 2015年 sanliang. All rights reserved.
//

#import "ZCUserModel.h"

@implementation ZCUserModel

+ (ZCUserModel *)sharedInstance
{
    static ZCUserModel *sharedInstance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedInstance = [[self alloc] init];
    });
    return sharedInstance;
}

- (void)setMobile:(NSString *)mobile
{
    [[NSUserDefaults standardUserDefaults] setObject:mobile forKey:@"mobile"];
    [[NSUserDefaults standardUserDefaults]synchronize];
}

- (NSString *)mobile
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"mobile"];
}

- (void)setUsername:(NSString *)username
{
    [[NSUserDefaults standardUserDefaults] setObject:username forKey:@"username"];
    [[NSUserDefaults standardUserDefaults]synchronize];
}

- (NSString *)username
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"username"];
}
- (void)setPassword:(NSString *)password
{
    [[NSUserDefaults standardUserDefaults] setObject:password forKey:@"password"];
    [[NSUserDefaults standardUserDefaults]synchronize];
}

- (NSString *)password
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"password"];
}

- (void)setMid:(NSString *)mid
{
    [[NSUserDefaults standardUserDefaults] setObject:mid forKey:@"mid"];
    [[NSUserDefaults standardUserDefaults]synchronize];
}

- (NSString *)mid
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"mid"];
}
@end
